/**
 * Created by 001 on 2017/4/6.
 */

var gulp = require('gulp'),
    del = require('del'),
    jshint = require('gulp-jshint'),
    spritesmith = require('gulp.spritesmith'),

    uglify = require('gulp-uglify'),
    concat = require('gulp-concat'),
    gutil = require('gulp-util'),
    ngAnnotate = require('gulp-ng-annotate'),
    htmlmin = require('gulp-htmlmin'),
    cleanCSS = require('gulp-clean-css'),
    exec = require('child_process').exec, //https://github.com/robrich/gulp-exec;
    preprocess = require('gulp-preprocess'), //https://github.com/jas/gulp-preprocess, https://github.com/jsoverson/preprocess#directive-syntax
    rename = require('gulp-rename'), //https://github.com/hparra/gulp-rename
    mergeStream = require('merge-stream'), //https://github.com/hparra/gulp-rename
    browserSync = require('browser-sync').create();

// var CacheBuster = require('gulp-cachebust'); //发布前根据文件内容生成校验码，放在文件名称后。避免缓存造成的影响。
// var cachebust = new CacheBuster();

//开发相关
gulp.task('browserSync', function () {
    browserSync.init({
        server: {
            baseDir: "./",
        },
        files: ['./templates/*.html', './js/**/*.js','./js/*.js'],
        startPath: "index.html",
        open:true
    });
});